using System.ComponentModel.DataAnnotations;
 using System.Data.Entity.ModelConfiguration;
using SalesPages.DomainModel;
namespace SalesPages.EntityFrameworkRepository.Mapping
{
    public class E1ContentVariableAuditMap : EntityTypeConfiguration<E1ContentVariableAudit>
    {
        public E1ContentVariableAuditMap()
        {
            // Primary Key
            this.HasKey(t => t.E1ContentVariableAudit_id);

            // Properties
            this.Property(t => t.SiteVersion)
                .HasMaxLength(50);

            this.Property(t => t.KeyName)
                .HasMaxLength(100);

            this.Property(t => t.DefaultValue)
                .HasMaxLength(500);

            this.Property(t => t.Descr)
                .HasMaxLength(100);

            this.Property(t => t.AuditHostName)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.AuditLoginName)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.AuditOperation)
                .IsRequired()
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("E1ContentVariableAudit");
            this.Property(t => t.E1ContentVariableAudit_id).HasColumnName("E1ContentVariableAudit_id");
            this.Property(t => t.Variable_id).HasColumnName("Variable_id");
            this.Property(t => t.SiteVersion).HasColumnName("SiteVersion");
            this.Property(t => t.KeyName).HasColumnName("KeyName");
            this.Property(t => t.DefaultValue).HasColumnName("DefaultValue");
            this.Property(t => t.Descr).HasColumnName("Descr");
            this.Property(t => t.InsertDate).HasColumnName("InsertDate");
            this.Property(t => t.UpdateDate).HasColumnName("UpdateDate");
            this.Property(t => t.AuditDate).HasColumnName("AuditDate");
            this.Property(t => t.AuditHostName).HasColumnName("AuditHostName");
            this.Property(t => t.AuditLoginName).HasColumnName("AuditLoginName");
            this.Property(t => t.AuditOperation).HasColumnName("AuditOperation");
        }
    }
}
